package com.baseframe.log.launch;

import com.baseframe.launch.scan.ImportLauncher;
import com.baseframe.launch.service.BaseLauncherService;
import org.springframework.boot.builder.SpringApplicationBuilder;

import java.util.Properties;

@ImportLauncher
public class BaseLogBaseLauncherServiceImpl implements BaseLauncherService {
    @Override
    public void launcher(SpringApplicationBuilder builder, String appName, String profile, boolean isLocalDev) {
        Properties properties = System.getProperties();
        properties.setProperty("logging.config", "classpath:log/logback-" + profile + ".xml");
        System.out.println("logging.config:classpath:log/logback-" + profile + ".xml");
    }
}
